var hctn = document.getElementById("hContainer");
var leftd = document.getElementById('drag-left');
var vbar = document.getElementById('vDragbar');
window.document.onmouseup = function () {
    document.removeEventListener('mousemove', vdrag);
}


const vdrag = (e) => {
    leftd.style.width = (e.pageX - vbar.offsetWidth / 2 - hctn.offsetLeft) + 'px';
}

vbar.addEventListener('mousedown', () => {
    document.addEventListener('mousemove', vdrag);
    console.log(vbar.offsetWidth)
});


